package com.ccnf.model.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ccnf.model.enums.AuthModeEnum;
import com.ccnf.model.enums.AuthStatusEnum;
import com.ccnf.model.enums.RoleTypeEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 授权信息表
 * </p>
 *
 * @author developer
 * @since 2019-03-04
 */
@Data
@ApiModel(value="Auth对象", description="授权信息表")
public class Authorization implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "授权ID", hidden = true)
    @JsonProperty("authId")
    private Long id;

    @ApiModelProperty(value = "展会ID", hidden = true)
    @JsonIgnore
    private Long expoId;

    @ApiModelProperty(value = "用户ID", hidden = true)
    @JsonIgnore
    private Long userId;

    @ApiModelProperty("用户名")
    @Excel(name = "姓名")
    private String username;

    @ApiModelProperty("手机号")
    @Excel(name = "手机号")
    private String phone;

    @ApiModelProperty(value = "授权角色")
    private RoleTypeEnum roleType;

    @ApiModelProperty("授权模式（0：微信，1：短信）")
    private AuthModeEnum authMode;

    @ApiModelProperty(value = "是否授权（0：否，1：是）")
    private AuthStatusEnum authStatus;

    @ApiModelProperty(value = "授权时间", hidden = true)
    private Long authTime;

    @ApiModelProperty("邀请函ID")
    @Excel(name = "授权邀请函ID")
    private Long invitationId;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;
}